package ex5;

public class Employee {
    private String name;//名字
    private  String numbers;//工号
    private double wage;//工资
    private static double sumTax = 0.0;//总税额
    public Employee(){

    }
    public Employee(String name, String numbers, double wage) {
        this.name = name;
        this.numbers = numbers;
        this.wage = wage;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNumbers() {
        return numbers;
    }

    public void setNumbers(String numbers) {
        this.numbers = numbers;
    }

    public double getWage() {
        return wage;
    }

    public void setWage(double wage) {
        this.wage = wage;
    }

    public static double getSumTax() {
        return sumTax;
    }

    public static void setSumTax(double sumTax) {
        Employee.sumTax = sumTax;
    }
    public double calculateTax(Employee e){
        double Tax = 0.0;
        Tax = (e.getWage()<=5000? 0.0
                : (e.getWage()<=10000? e.getWage()*0.05 : e.getWage()*0.1));

        sumTax += Tax;
        return Tax;
    }
}
